package com.open.capacity.talented.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.open.capacity.talented.dao.UnemployedDao;
import com.open.capacity.talented.dto.LayuiDto;
import com.open.capacity.talented.service.UnemployedService;
import com.open.capacity.talented.vo.UnemployedWithIndustryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 待业人员
 */
@Service
@Component
public class UnemployedServiceImpl implements UnemployedService {
    @Autowired
    UnemployedDao unemployedDao;

    /**
     *
     * @return 待业人员和所在行业
     * @param dto
     * @param enabled
     */
    @Override
    public PageInfo<UnemployedWithIndustryVo> queryAllWithIndustry(LayuiDto dto, Integer enabled) {
        PageHelper.startPage(dto.getPage(),dto.getLimit());
        return new PageInfo<UnemployedWithIndustryVo>(unemployedDao.queryAllWithIndustry(enabled));
    }
}
